
# 写古诗
def touch(name):
    str = input('请输入一首古诗：')
    try:
        f = open(name, 'w')
        f.write(str)
    except:
        print('出错')
    f.close()
    print('写入完成！')

# 复制古诗
def fuzhi(f1, f2):
    f1 = open(f1, 'r')
    f2 = open(f2, 'w')
    f2.write(f1.read())
    f2.close()
    f1.close()
    print('复制完成！')

touch('gushi')
fuzhi('gushi', 'copy')





